package com.xinzhi.controller;

import com.xinzhi.pojo.Incomeandexpenditurerecord;
import com.xinzhi.service.IRecardService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RecardController {
    @Autowired
    private IRecardService iRecardService;

    /**
     * 添加收入支出记录
     * @return
     */
    @PostMapping("/addRecard")
    public Result addRecard(){
        //调用service层方法
        iRecardService.addRecard(Incomeandexpenditurerecord.builder().build());
        return Result.ok("添加成功");
    }
}
